﻿@model VasilekCerozhka.Models.ProductAPI.Product.ProductDtoBase

<div id="Idloader" class="loader-container">
    <span class="loader"></span>
</div>

<br />

<form asp-action="ProductDelete" id="IdForm" class="container form-glass" hidden>

    <input asp-for="ProductId" hidden />

    <br />
    <div class="container p-3">
        <h1 class="text-primary">Удалить продукт</h1>

        <hr />
        <div class="row mx-auto">

            <div class="col-3">

                <div class="pb-3">
                    @if (Model.SecondaryImages.Count > 0)
                    {
                        <div class="pb-2">
                            <label class="control-label pt-2" style="font-size:20px;">Tекущий список изображений</label>
                        </div>

                        <div id="carouselExampleDark" class="carousel carousel-blue slide carousel-fade" data-bs-ride="carousel">
                            <div class="carousel-inner effect_gloss_div">
                                @{
                                    int i = 0;
                                }
                                @foreach (var item in Model.SecondaryImages)
                                {
                                    i++;
                                    var active = i == 1 ? "active" : "";
                                    <div class="carousel-item @active" data-bs-interval="3900">
                                        <img src="@item.ImageUrl" alt="Image @item" class="d-block w-100 h-100">
                                    </div>
                                }
                            </div>
                        </div>
                    }
                    else
                    {
                        <img src="~/img/886fac756d43925eea0cb1e3643b0dfd.jpg" class="w-100" />
                    }
                </div>

            </div>

            <div class="col-6 px-5 mt-3">

                <div class="form_input_custom" disabled>
                    <input asp-for="ProductName" required autocomplete="on" />

                    <label asp-for="ProductName" for="name" class="label_name_input">
                        <span class="content_name_input">Наименование</span>
                    </label>
                </div>

                <div class="form_input_custom" disabled>
                    <input asp-for="Category.CategoryName" required autocomplete="on" />

                    <label asp-for="Category.CategoryName" for="name" class="label_name_input">
                        <span class="content_name_input">Наименование</span>
                    </label>
                </div>

                <div disabled>

                    <div class="col-12 pt-4">

                        <label id="id_label_textarea" class="label_textarea_focus">Описание</label>

                        <div id="borderId" class="border_textarea_custom">
                            <textarea asp-for="Description" id="id_textarea" class="textarea_custom" onblur="TextareaEmpty()" onclick="TextareaChangesStyle()"></textarea>
                        </div>
                   
                    </div>

                </div>

                <div class="form_input_custom mt-3" disabled>
                    <input asp-for="Price" required autocomplete="on" />

                    <label asp-for="Price" for="name" class="label_name_input">
                        <span class="content_name_input">Наименование</span>
                    </label>
                </div>

                <div class="row p-3">

                    <div class="col-6">

                        <div class="container_btn_custom">
                            <a asp-action="ProductIndex" class="btn_custom a_custom">Вернуться</a>
                        </div>

                    </div>
                    <div class="col-6">

                        <div class="container_btn_custom">
                            <button type="submit" class="btn_custom a_custom" >Удалить </button>
                        </div>

                    </div>

                </div>
            </div>

            <div class="col-3">

                <div class="pb-3 box">

                    @if (Model.ProductId != 0)
                    {
                        <div class="pb-2">
                            <label class="control-label pt-2" style="font-size:20px;">Tекущие изображение</label>
                        </div>

                        <div class="effect_gloss_img">
                            <img src="@Model.MainImageUrl" />
                        </div>
                    }
                    else
                    {
                        <img src="~/img/886fac756d43925eea0cb1e3643b0dfd.jpg" class="w-100" />
                    }

                </div>

            </div>
        </div>
    </div>
</form>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}
